$SAVE
$NOLIST
;************************************************************************
;*									*
;*    R T X - 5 1  :  EXTERNAL DATA AND CONSTANT DECLARATIONS           *
;*							     		*
;*----------------------------------------------------------------------*
;*                                                                      *
;*    Filename     :   RTXEXTRN.INC                                     *
;*    Language     :   Keil A-51                                        *
;*    Dev. system  :   Keil uVision2                                    *
;*    Targetsystem :   Any system based upon 8051 up                    *
;*                                                                      *
;*    Purpose      :   Declaration of variables and constants as        *
;*                     exernals (to be used as include-file)            *
;*                                                                      *
;*----------------------------------------------------------------------*
;* Rev. |  Released   | Programmer    | Comments                        *
;*----------------------------------------------------------------------*
;*  0.1 |  16.1.90    | E. Glatz      | Changes for V3.18               *
;*  0.2 |   5.4.91    | Th. Fischler  | Changes for V4.0                *
;*      |  30.4.91    |               | New name RTXEXTRN.DCL           *
;*      |  13.8.91    |               | All externals with prefix ?RTX_ *
;*      |  18.9.91    |               | supervisor-mode flag added      *
;*      |  13.4.92    |               | Variables for Bankswitching     *
;*      |             |               | added                           *
;*  5.0 |   5.10.1994 | E. Glatz      | Not needed references eliminated*
;*  5.0 |  10.10.1994 |               | New externals for V 5.0         *
;* 7.00 |  13.11.2001 | T. Mueller    | Release 7.00                    *
;************************************************************************
;*    Copyright 1991 .. 2001 METTLER  &  FUCHS  AG,  CH-8953 Dietikon   *
;************************************************************************

;*----------------------------------------------------------------------*
;*	I M P O R T S (from RTXDATA.A51)
;*----------------------------------------------------------------------*

;       Relocatable bitaddressable byte segment
;
EXTRN  DATA (?RTX_BIT_RELBYTE_BEG)
EXTRN  DATA (?RTX_RUNNING_TID, ?RTX_TMP0)
EXTRN  DATA (?RTX_BIT_RELBYTE_END)

;       Relocatable byte segment
;
EXTRN  DATA (?RTX_RELBYTE_BEG)
EXTRN  DATA (?RTX_TMP1, ?RTX_TMP2, ?RTX_TMP3, ?RTX_TMP4, ?RTX_TMP5, ?RTX_TMP6)
EXTRN  DATA (?RTX_DISP_TMP1, ?RTX_DISP_TMP2, ?RTX_DISP_TMP3, ?RTX_DISP_TMP4)
EXTRN  DATA (?RTX_DISP_TMP5)
EXTRN  DATA (?RTX_ACT_LIFO_EL, ?RTX_P2_MIR)
EXTRN  DATA (?RTX_RDY_COUNT0, ?RTX_RDY_COUNT1, ?RTX_RDY_COUNT2, ?RTX_RDY_COUNT3)
EXTRN  DATA (?RTX_RDY_FIRST0, ?RTX_RDY_FIRST1, ?RTX_RDY_FIRST2, ?RTX_RDY_FIRST3)
EXTRN  DATA (?RTX_RDY_LAST0, ?RTX_RDY_LAST1, ?RTX_RDY_LAST2, ?RTX_RDY_LAST3)
EXTRN  DATA (?RTX_SAVE_INT_A, ?RTX_SAVE_INT_B, ?RTX_SAVE_INT_DPL, ?RTX_SAVE_INT_DPH)
EXTRN  DATA (?RTX_SAVE_INT_PSW, ?RTX_SAVE_INT_SP, ?RTX_SAVE_INT_TID, ?RTX_SAVE_INT_RSP)
EXTRN  DATA (?RTX_SYSCLK_COUNT)
$IF (DBG = 03H)
   EXTRN  DATA (?RTX_SYSCLK_COUNTHI)
$ENDIF
EXTRN  DATA (?RTX_RELBYTE_END)

;       Bit segment
;
EXTRN   BIT (?RTX_PROCESSOR_ALLOCATED, ?RTX_REQ_REDISPATCH)
EXTRN   BIT (?RTX_SYSCLK_ISR, ?RTX_FULL_CONTEXT)
EXTRN   BIT (?RTX_REENTRANTFLAG, ?RTX_ENA_INT_REG1, ?RTX_ENA_INT_REG2)
EXTRN   BIT (?RTX_ROUND_ROBIN_REQ, ?RTX_ROUND_ROBIN_OK)
EXTRN   BIT (?RTX_SUPERVISOR_MODE, ?RTX_SAVE_INT_SV, ?RTX_BANKSW)
EXTRN   BIT (?RTX_MBX_SUPPORT, ?RTX_SEM_SUPPORT)
$IF (DBG = 01H)
   EXTRN BIT (BUSY_FLAG, LOCK_FLAG, SYSOP_FLAG, CLOCK_FLAG)
$ENDIF
$IF (DBG = 02H)
   EXTRN BIT (BUSY_FLAG)
$ENDIF

;       XDATA segment
;
EXTRN XDATA (?RTX_SYS_PAGE)
EXTRN XDATA (?RTX_INT_TID_TABLE_BASE)
EXTRN XDATA (?RTX_INT0_TID, ?RTX_INT1_TID, ?RTX_INT2_TID, ?RTX_INT3_TID)
EXTRN XDATA (?RTX_INT4_TID, ?RTX_INT5_TID, ?RTX_INT6_TID, ?RTX_INT7_TID)
EXTRN XDATA (?RTX_INT8_TID, ?RTX_INT9_TID, ?RTX_INT10_TID, ?RTX_INT11_TID)
EXTRN XDATA (?RTX_INT12_TID, ?RTX_INT13_TID, ?RTX_INT14_TID, ?RTX_INT15_TID)
EXTRN XDATA (?RTX_INT16_TID, ?RTX_INT17_TID, ?RTX_INT18_TID, ?RTX_INT19_TID)
EXTRN XDATA (?RTX_INT20_TID, ?RTX_INT21_TID, ?RTX_INT22_TID, ?RTX_INT23_TID)
EXTRN XDATA (?RTX_INT24_TID, ?RTX_INT25_TID, ?RTX_INT26_TID, ?RTX_INT27_TID)
EXTRN XDATA (?RTX_INT28_TID, ?RTX_INT29_TID, ?RTX_INT30_TID, ?RTX_INT31_TID)
EXTRN XDATA (?RTX_RDY_PRIO0, ?RTX_RDY_PRIO1, ?RTX_RDY_PRIO2, ?RTX_RDY_PRIO3)
EXTRN XDATA (?RTX_RDY_PRIO0_END, ?RTX_RDY_PRIO1_END, ?RTX_RDY_PRIO2_END, ?RTX_RDY_PRIO3_END)
EXTRN XDATA (?RTX_STATE_TABLE)
EXTRN XDATA (?RTX_MBX_CONTROL_BASE)
EXTRN XDATA (?RTX_SEM_TOKENS)
EXTRN XDATA (?RTX_SYS_PAGE_END)

EXTRN XDATA (?RTX_AUX_PAGE)
EXTRN XDATA (?RTX_DEBUG_TID, ?RTX_TID_TABLE, ?RTX_KNTXT_PTR_TABLE)
EXTRN XDATA (?RTX_DELAY_LIST_CLK, ?RTX_DELAY_LIST_TID, ?RTX_SYS_TICK)
EXTRN XDATA (?RTX_INTERVAL_LIST)
EXTRN XDATA (?RTX_ISR_LIFO, ?RTX_POOL_CONTR, ?RTX_INTERNAL_NUM_TABLE)
EXTRN XDATA (?RTX_AUX_PAGE_END)

EXTRN XDATA (?RTX_MBX_PAGE)
EXTRN XDATA (?RTX_MBX_PAGE_END)
EXTRN XDATA (?RTX_SEM_PAGE)
EXTRN XDATA (?RTX_SEM_PAGE_END)


;*----------------------------------------------------------------------*
;*      I M P O R T  from RTX2C51.A51 and Keil C-51/L-51
;*----------------------------------------------------------------------*

; System constants
EXTRN NUMBER  (?RTX_EXTSTKSIZE, ?RTX_EXTREGSIZE)

;  Floating-Point Flags
EXTRN BIT     (?RTX_TS_DELAY, ?RTX_TS_REQ)

;  Reentrant-Stackpointer
EXTRN DATA     (?RTX_PBP)

;  Driver-Task Stack and Context space (defined in RTXCONF)
EXTRN IDATA    (?RTX_FTASKDATA?1, ?RTX_FTASKDATA?2, ?RTX_FTASKDATA?3)

;  Reentrant-Stack for Driver-Tasks
EXTRN XDATA    (?RTX_FTASKCONTEXT?1, ?RTX_FTASKCONTEXT?2, ?RTX_FTASKCONTEXT?3)

;  Number of Tasks
EXTRN NUMBER   (?RTX_CNTTASK)

;  Max Task-Number
EXTRN NUMBER   (?RTX_MAXTASKN)

;  Reentrant flag (0 : no reentrant functions, 1 : reentrant functions)
EXTRN NUMBER   (?RTX_REENTRANT)

;  Start-Address of the Initial-Taskdescriptors
EXTRN CODE     (?RTX_TASKCONST)

;  User-num-table
EXTRN XDATA   (?RTX_USER_NUM_TABLE)

;  Interrupt-Descriptor Table
EXTRN CODE     (?RTX_ISRDESCR)

;        Taskswitching for Floating-Point Operations
EXTRN CODE     (?RTX_TASKSWITCHING)


;*----------------------------------------------------------------------*
;*      I M P O R T  from RTXCONF.A51
;*----------------------------------------------------------------------*

; Processor specific interrupt enable masks
EXTRN DATA     (?RTX_IE, ?RTX_IEN1, ?RTX_IEN2)

; Interrupt mask variables
EXTRN DATA     (?RTX_NM_IE, ?RTX_D_IE, ?RTX_ND_IE)
EXTRN DATA     (?RTX_NM_IE1, ?RTX_D_IE1, ?RTX_ND_IE1)
EXTRN DATA     (?RTX_NM_IE2, ?RTX_D_IE2, ?RTX_ND_IE2)

; Interrupts to Bits table
EXTRN CODE     (?RTX_INT_TO_BIT_TABLE_BASE)

; Greatest interrupt number
EXTRN NUMBER   (?RTX_MAX_INT_NBR)

; System-Constants
EXTRN NUMBER   (?RTX_EXTRENTSIZE, ?RTX_INTSTKSIZE)
EXTRN NUMBER   (?RTX_TIMESHARING, ?RTX_INTREGSIZE)
EXTRN NUMBER   (?RTX_MAILBOX_SUPPORT, ?RTX_SEMAPHORE_SUPPORT)

$RESTORE
